##############################################################
#Table C3: Reduced Form: Closest Hurricane Exposure and Democrat Vote
##############################################################

data <- read.dta13("./input/cces-closest.dta")

m1 <- lm(dem14~logd, data=data)
m1.rob <- coeftest(m1, vcov = vcovHC(m1, type="HC1")) 
m2 <- lm(dem14~logd +factor(race_14) + factor(education) + female  + factor(income_quarters) + 
           employed + out_of_labour +  age, data=data)
m2.rob <- coeftest(m2, vcov = vcovHC(m2, type="HC1")) 

stargazer(m1.rob, m2.rob, 
          title="Reduced Form: Closest Hurricane Exposure and Democrat Vote", 
          out=paste("./figures/tabc3", ".tex", sep=""),
          keep=c("logd", "logd"),
          keep.stat = c("n","rsq"))
stargazer(m1, m2) ## to obtain N and RSQ





